<template>
    <ModalCom v-bind="$attrs" width="520px" @open="modalOpen" :inner-loading="innerLoading" :ok-async="okAsync">
      <Table ref="tabelRef" :column="column" :is-page="false">
      </Table>
    </ModalCom>
</template>

<script setup>
import { reactive, ref } from "vue"
// 跨级组件
import ModalCom from "@/components/modal/index.vue"
import Table from "@/components/table/index.vue"

const column = ref([
    {
        title: "角色名称",
        field: "bookname",
        format: ({cellValue}) => thousandth({ value: cellValue })
    },
    {
        title: "角色描述",
        field: "booktotal"
    },
])

// props
const props = defineProps({
  row: {
    type: Object,
    default: () => ({})
  }
})



const innerLoading = () => {
  return new Promise((resolve, reject) => { // then，catch
    setTimeout(() => {
      resolve()
    }, 500)
  })
}
const modalOpen = () => {
  // state.fields.name = props.row.bookname
}
</script>